package br.com.usjt.locadoraweb.model;

import java.util.ArrayList;
import java.util.List;
import br.com.usjt.locadoraweb.dao.VehicleGroupDAO;

public class VehicleGroup {

	private int id;
	private String groupName;
	private List<VehicleGroup> groups;


	public VehicleGroup(){
	}
	
	public List<VehicleGroup> getGroups() {
		return groups;
	}

	public void setGroups(List<VehicleGroup> groups) {
		this.groups = groups;
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public String getGroupName() {
		return groupName;
	}
	
	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}
	
	public List<VehicleGroup> search(){
		System.out.println("passou search de VehicleGroups");
		VehicleGroupDAO group = new VehicleGroupDAO();
		groups = new ArrayList<VehicleGroup>();
		try {
			groups = group.search();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		System.out.println(groups.toString());
		return groups;
		
	}
	
}
